package com.senney.practice.jedis;

import redis.clients.jedis.Jedis;

public class TestMS {
    public static void main(String[] args) throws InterruptedException {
        Jedis jedis_M=new Jedis("192.168.2.101",6379);
        Jedis jedis_S=new Jedis("192.168.2.101",6380);

        jedis_S.slaveof("192.168.2.101",6379);
        jedis_M.set("k1","v1");
        Thread.sleep(600);
        System.out.println(jedis_S.get("k1"));
    }
}
